import java.util.Scanner;

//递归打印数字的每一位
public class TextDemo {
    public static void  print(int n){
        if(n<10) {
            System.out.print(n%10);
            System.out.print(" ");
            return ;
        }
        print(n/10);
        System.out.print(n%10);
        System.out.print(" ");

    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        print(n);
        //System.out.println(ret);
    }
}
